Original article: http://blog.csdn.net/biologypianoprogram/archive/2009/04/30/4139903.aspx
1: nextsibling attributes
This attribute indicates the next node of the current node (the node after it belongs to the same level as the current node).
1: nextSibling attributes This attribute indicates the next node of the current node (the node after it belongs to the same level as the current node). If it does not have a node of the same level as it later, null is returned.Note that the
This article mainly introduces information about the correct usage of previussibling and nextSibling in javascript. If you need it, you can refer to my time verification. The format does not need to be verified, you only need to verify the size of
This article mainly introduces information about the correct usage of previussibling and nextSibling in javascript. if you need it, you can refer to my time verification. the format does not need to be verified, you only need to verify the size of
NextSibling Property: This property represents the next node of the current node, and if there is no node with its sibling, the Null;previoussibling property is returned: This property is the opposite of the NextSibling property, which is described
This blog is only for the personal study of the information recorded in use, the information contained may originate from the network without indicating the source, please understand.The nextSibling and previoussibling in JavaScript and the next()
I do the verification of the time, the format is not required to verify, only need to verify the start date and end date of the size, but because the input page is batch, and each row is automatically generated, so you can not use the ID as a
This article from: http://ailantian.bokee.com/6418694.html
The original article is as follows:
The javascript compatibility between Firefox and IE on the Internet is also much discussed.Search for "Firefox Javascript compatibility" on
1:nextsibling Property
The attribute represents the next node of the current node (the following node is at the same level as the current node), or null if there is no subsequent node with its sibling.
A special note is that the results of this
In a front-end development process, the blogger uses the NextSibling attribute of the DOM element to get the next sibling element, but gets unintended results. The code snippet is as followsDOCTYPE HTML>HTML>Body>ul> LiID= "Coffee">CoffeeLi> li id=
There are many spaces in Firefox as text nodes, so problems will occur when we use nextsibling and previoussibling. Because Firefox will mistakenly treat the text node as the sibling node of the element node. We can add nodetype to judge. When the
About nextSibling, IEnextSibling in IE
features
System Environment: win8, ie11
Problem: nextSibling fails to get the next node of the current node at the same level.
Process description: When you click [feature], the innerHtml of div2 is
element. FirstChild: Read-only property the first child nodeStandard: FirstChild will contain the text type of the nodeNon-standard: contains only ELEMENT nodeselement. Firstelementchild: Gets the child nodes of the first element type under the read-
2. Get the next element node:
function getnextelement (node) {//Declaration getnextelement functions, parameters are node nodes.if (Node.nodetype = = 1) {//If the node node type value is equal to 1 true, that is, the node node is an element node,
Record the knowledge points encountered in learning JavaScript1, when using nextsibling to get UL under the second node ID of three Li tags, found that IE10, Chrome does not ignore the line break, Space and TAB key.DOCTYPE HTML>HTML> Head>
Firstchild,lastchild,nextsibling,previoussibling is supported under IEBut under FF, because it will be the space between the labels as a text node, so in order to accurately find the corresponding elements, will be
Someone asked me how to use JavaScript to remove the following code:
This is a div
My answer is:
Document. getelementbyid ("Link"). removenode (true)
Document. getelementbyid ("Div"). removenode (true)
However, I ignored the intermediate
Regarding the HTMLXML node, nextSibling in IE does not return text nodes, whereas chrome or firefox will return text nodes. Today, when writing JavaScript code, it encounters a da trap (keng)
Question about HTML/XML nodes
It is said that in IE,
123html Example 4789 Ten Oneqqqqq Awwww -yyyyyy -test1111 the - - $Panax NotoginsengThe above case in Google Chrome and IE is undefined, and print the Lastchildnode display is object text, because in the Advanced browser, the first and last
nextSiblingjavascriptjqueryhtmlcss3phpjavaThe NextSibling property returns the node immediately following a node (in the same tree hierarchy) PreviousSibling property returns the node immediately before a node (in the same tree hierarchy).
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.